{% extends 'layout/basic.html' %}

{% load crispy_forms_tags %}

{% block title %} 用户注册 {% endblock title %}

{% block css %}
<style>
    .siginup {
        width: 100%;
        max-width: 400px;
        margin: 80px auto 80px auto;
        padding: 20px;
        border: 1px solid #f0f0f0;
        -webkit-box-shadow: 5px 10px 10px rgba(0, 0, 0, .05);
        box-shadow: 5px 10px 10px rgba(0, 0, 0, .05);
    }
</style>
{% endblock css %}

{% block content %}
<div class="container">
    <div class="siginup">

        {% crispy form %}
        <!-- <h3 class="mb-3 font-weight-normal">用户注册</h3>
            <form id="form" method="POST" novalidate>
            {% csrf_token %}
            {% for field in form %}
            {% if field.name == 'code' %}
            <div class="form-group">
                <div class="col-8">
                    {{ field|as_crispy_field }}
                </div>
                <div class="col-4">
                    <button class="btn btn-secondary">发送验证码</button>
                </div>
                <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                <div class="form-row mb-3">
                    <div class="col-md-8">{{ field }}</div>
                    <div class="col-md-4 pl-2"><button class="btn btn-secondary">发送验证码</button></div>
                </div>
            </div>
            {% else %}
            {{ field|as_crispy_field }}
            {% endif %}
            {% endfor %}
            <button type="submit" class="btn btn-primary">注册</button>
        </form> -->
    </div>
</div>
{% endblock content %}

{% block js %}

{% endblock js %}